﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Slex.Timeline;
using Slex;

namespace Test.Scenes {
    public partial class Cardtoon : Page {
        public Cardtoon() {
            InitializeComponent();
            b1.Click += b1_Click;
            b2.Click += b2_Click;
        }

        private void b2_Click(object sender, RoutedEventArgs e) {
            var sb=r2.Widthx(200);
            var sb2 = r2.BackgroundFillx(Brushs.Coral.ToBrush());
            sb.Combine(sb2).Begin();
        }

        void b1_Click(object sender, RoutedEventArgs e) {
            var sb = r1.Transformx(Cartoon.GetTrf(400, 20), new TlArgument(500, rever: true));
            var sb2 = r1.Opacityx(0, new TlArgument(400, rever: true));
            sb.Combine(sb2);
            sb.Begin();
        }

        // 当用户导航到此页面时执行。
        protected override void OnNavigatedTo(NavigationEventArgs e) {
        }

    }
}
